fix(test-setup): stop shadowing ten real registrations, and declare page:header's inputs - #3051
Merged
Merged
Conversation
…age:header's inputs vitest.setup.dom.tsx re-registered text, email, password, textarea, image, html, avatar, select, slider and grid by hand — ~380 lines of renderer copied out of @object-ui/components — to undo bare-name fallbacks that @object-ui/fields and the plugins claimed by loading after it. Both sides now register under their own namespace with skipFallback: true, so nothing overwrites the ui: originals and the workaround is obsolete. It was not free: the copies carried no `inputs` and no `defaultProps`, so inside the test environment four curated public blocks reported an empty configuration surface while the real registrations declare one. apps/console's contract test reads that registry, so its picture of the contract was fiction for those tags — a guard measuring a fixture instead of the product. Deleting the block restores what the app actually boots with. Verified: the ten tags keep their namespace and canonical type, and their declared surface comes back — text 1 input, email 6, password 6, textarea 6, image 3, html 1, avatar 4, select 6, slider 5, grid 7, plus defaultProps. The heavy DOM setup also got roughly twice as fast (~545s to ~235s of setup time across the suite), since every file in that project was paying to evaluate the duplicated renderers. With the shadowing gone, page:header was left as a genuine gap: a curated public block whose renderer reads title, subtitle, actions, breadcrumb, recordChrome, showStar and showCopyId, with none of them declared. Now declared. element:divider keeps zero inputs on purpose — its renderer reads only className, so there is nothing to author. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N4mrr1ihhwnfEHFSWmGoMp
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The shadowing #3037 turned up.
vitest.setup.dom.tsxre-registered ten components by hand — ~380 lines of renderer copied out of @object-ui/components — with this rationale:That premise no longer holds. All ten now register under their own namespace with
skipFallback: true, so nothing overwrites theui:originals:plugin-grid'sview:gridlikewise. The workaround outlived its cause.Why it mattered
The copies carried no
inputsand nodefaultProps. So inside the test environment four curated public blocks reported an empty configuration surface while the real registrations declare one — andapps/console's contract test reads that registry. Its picture of the contract was fiction for those tags: a guard measuring a fixture instead of the product.The copies were verbatim duplicates, so nothing rendered differently — they just dropped the metadata on the way through.
After deleting the block
Namespace and canonical type unchanged for all ten; the declared surface comes back:
texthtmlemailavatarpasswordselecttextareasliderimagegrid…plus
defaultProps. Contract still 42/42.The heavy DOM setup also got roughly twice as fast — ~545s → ~235s of setup time across the suite. Every file in that project was paying to evaluate the duplicated renderers.
One genuine gap it was hiding
With the shadowing gone, curated blocks reporting no inputs drop from 13 to 9 — seven lazy stubs (
inputsunknown until the chunk loads, not absent), plus:page:header— a real gap. The renderer readstitle,subtitle,actions,breadcrumb,recordChrome,showStar,showCopyId, none declared. Now declared,classNameleft out as a styling pass-through and host-injectedheaderSystemActionsleft out as not-authored.element:divider— keeps zero inputs on purpose: its renderer reads onlyclassName, so there is nothing to author. Not every emptyinputsis a defect.Full suite
745 passed | 1 skipped, lint 0 errors, type-check 38/38, changeset included.🤖 Generated with Claude Code
https://claude.ai/code/session_01N4mrr1ihhwnfEHFSWmGoMp
Generated by Claude Code